import boxen from 'boxen';
import picocolors from 'picocolors';

export default function appInfo() {
    return {
        name: "appInfo",
        apply: 'serve',
        async buildStart() {
            const {bold, green, cyan, bgGreen} = picocolors;
            // eslint-disable-next-line no-console
            console.log(
                boxen(
                    `${bold(green(`${bgGreen('SKY UI STAND v4.18.19-SNAPSHOT')}`))}\n${cyan('持续迭代优化的SKY UI管理系统。')}`,
                    {
                        padding: 1,
                        margin: 1,
                        borderStyle: 'double',
                        textAlignment: 'center'
                    }
                )
            )
        }
    }
}
